<?php
/**
 * Created by PhpStorm.
 * @author: 汤文辉
 * @since: 2017/6/20 14:49
 * 获取数据库中所有图书的信息
 */
include_once 'config/mysqlconfig.php';
include 'class/Book.php';

$book = new Book($con);
if($book){
    $count = $book->getBookNum();//获得图书数目
    for($i=0;$i<$count;++$i){
        $book_id = 1001+$i;
        $book_info[$i] = $book->getBookInfo($book_id);//获得图书信息
    }
}
$con->close();